package org.tzw.template.view.bottomDialog;

import android.app.Activity;

import com.google.android.material.bottomsheet.BottomSheetDialog;

public abstract class AbstractBottomSheetDialog {
    protected Activity mActivity;
    protected BottomSheetDialog mBottomSheetDialog;

    public AbstractBottomSheetDialog(Activity mActivity) {
        this.mActivity = mActivity;
        mBottomSheetDialog = new BottomSheetDialog(mActivity);
        mBottomSheetDialog.setCanceledOnTouchOutside(false);
        mBottomSheetDialog.setCancelable(false);
        initView();
        initData();
        initListener();
    }

    protected abstract void initView();

    protected abstract void initData();

    protected abstract void initListener();

    public void show() {
        mBottomSheetDialog.show();
    }

    public void cancel() {
        mBottomSheetDialog.cancel();
    }


}
